package cn.tedu.spring2205.week01.demo01;

import cn.tedu.spring2205.week01.demo01.config.MyConfig;
import cn.tedu.spring2205.week01.demo01.dao.DogDao;
import org.springframework.boot.SpringApplication;
import org.springframework.context.ApplicationContext;

public class Week01Test2 {
    public static void main(String[] args) {
        //隐式配置测试  @Component
        ApplicationContext context = SpringApplication.run(MyConfig.class);
        //获取DogDao的Bean对象
        DogDao dao = context.getBean("dogDaoImpl", DogDao.class);
        System.err.println(dao);
    }
}
